<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>绿能智链 - 首页</title>
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            background-color: #f8faf9;
            color: #333;
            min-height: 100vh;
        }

        .app-header {
            background: linear-gradient(135deg, #1a8754, #0d6e3d);
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }
        .data-card {
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
        }
        .data-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.1);
        }
        .nft-card {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 8px rgba(0,0,0,0.08);
            transition: all 0.3s ease;
        }
        .nft-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 16px rgba(0,0,0,0.12);
        }
        .tab-bar {
            background-color: white;
            border-top: 1px solid #e5e7eb;
            box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
        }
        .tab-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 8px 0;
            color: #6b7280;
        }
        .tab-item.active {
            color: #10b981;
        }
        .bg-pattern {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('https://images.unsplash.com/photo-1548266652-99cf27701ced?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80');
            background-size: cover;
            background-position: center;
            opacity: 0.15;
            z-index: -1;
        }
        .data-flow {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-image: url('https://images.unsplash.com/photo-1558494949-ef010cbdcc31?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80');
            background-size: cover;
            background-position: center;
            opacity: 0.05;
            z-index: -1;
            animation: flow 20s linear infinite;
        }
        @keyframes flow {
            0% { background-position: 0% 0%; }
            100% { background-position: 100% 100%; }
        }
        .content-area {
            height: calc(100vh - 60px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }
    </style>
</head>
<body class="flex flex-col h-full">


    <!-- 应用头部 -->
    <header class="app-header p-4 text-white relative">
        <div class="flex justify-between items-center">
            <h1 class="text-xl font-bold">探索</h1>
            <div class="flex space-x-4">
                <button class="bg-white bg-opacity-20 rounded-full px-4 py-1 text-sm font-medium">
                    <i class="fas fa-wallet mr-1"></i> 连接钱包
                </button>
                <div class="w-8 h-8 bg-gray-200 rounded-full overflow-hidden">
                    <img src="https://images.unsplash.com/photo-1535713875002-d1d0cf377fde?ixlib=rb-1.2.1&auto=format&fit=crop&w=100&q=80" alt="用户头像" class="w-full h-full object-cover">
                </div>
            </div>
        </div>
        <div class="bg-pattern"></div>
        <div class="data-flow"></div>
    </header>

    <!-- 主内容区域 -->
    <div class="content-area flex-1 p-4 relative">
        <!-- 实时数据展示 -->
        <section class="mb-6">
            <h2 class="text-lg font-semibold mb-3 text-gray-800">实时数据</h2>
            <div class="grid grid-cols-3 gap-3">
                <div class="data-card p-3">
                    <div class="text-green-600 text-sm font-medium">总发电量</div>
                    <div class="text-xl font-bold mt-1">1,245 <span class="text-sm font-normal">MWh</span></div>
                    <div class="text-xs text-gray-500 mt-1">↑ 12% 本周</div>
                </div>
                <div class="data-card p-3">
                    <div class="text-green-600 text-sm font-medium">碳减排量</div>
                    <div class="text-xl font-bold mt-1">856 <span class="text-sm font-normal">吨</span></div>
                    <div class="text-xs text-gray-500 mt-1">↑ 8% 本月</div>
                </div>
                <div class="data-card p-3">
                    <div class="text-green-600 text-sm font-medium">NFT交易量</div>
                    <div class="text-xl font-bold mt-1">324 <span class="text-sm font-normal">笔</span></div>
                    <div class="text-xs text-gray-500 mt-1">↑ 15% 本周</div>
                </div>
            </div>
        </section>

        <!-- 精选风力发电站NFT -->
        <section>
            <div class="flex justify-between items-center mb-3">
                <h2 class="text-lg font-semibold text-gray-800">精选风力发电站</h2>
                <a href="#" class="text-green-600 text-sm">查看全部</a>
            </div>
            <div class="space-y-4">
                <!-- NFT卡片1 -->
                <div class="nft-card">
                    <div class="relative h-40">
                        <img src="https://images.unsplash.com/photo-1466611653911-95081537e5b7?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="风力发电站" class="w-full h-full object-cover">
                        <div class="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black to-transparent p-3">
                            <div class="text-white font-semibold">青海湖风力发电站</div>
                            <div class="text-white text-sm opacity-80">青海省海南藏族自治州</div>
                        </div>
                    </div>
                    <div class="p-3">
                        <div class="flex justify-between items-center mb-2">
                            <div class="text-sm text-gray-600">剩余可购电量</div>
                            <div class="text-sm font-medium">2,500 kWh</div>
                        </div>
                        <div class="flex justify-between items-center">
                            <div class="text-sm text-gray-600">价格</div>
                            <div class="text-green-600 font-semibold">0.05 ETH / 100 kWh</div>
                        </div>
                        <a href="nft_detail.html" class="mt-3 w-full bg-green-600 text-white py-2 rounded-lg font-medium hover:bg-green-700 transition text-center block">查看详情</a>
                    </div>
                </div>

                <!-- NFT卡片2 -->
                <div class="nft-card">
                    <div class="relative h-40">
                        <img src="https://images.unsplash.com/photo-1532601224476-15c79f2f7a51?ixlib=rb-1.2.1&auto=format&fit=crop&w=800&q=80" alt="风力发电站" class="w-full h-full object-cover">
                        <div class="absolute bottom-0 left-0 right-0 bg-gradient-to-t from-black to-transparent p-3">
                            <div class="text-white font-semibold">张北坝上风力发电站</div>
                            <div class="text-white text-sm opacity-80">河北省张家口市</div>
                        </div>
                    </div>
                    <div class="p-3">
                        <div class="flex justify-between items-center mb-2">
                            <div class="text-sm text-gray-600">剩余可购电量</div>
                            <div class="text-sm font-medium">1,800 kWh</div>
                        </div>
                        <div class="flex justify-between items-center">
                            <div class="text-sm text-gray-600">价格</div>
                            <div class="text-green-600 font-semibold">0.04 ETH / 100 kWh</div>
                        </div>
                        <a href="nft_detail.html" class="mt-3 w-full bg-green-600 text-white py-2 rounded-lg font-medium hover:bg-green-700 transition text-center block">查看详情</a>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <!-- 底部Tab栏 -->
    <div class="tab-bar h-16 flex justify-around items-center">
        <a href="home.html" class="tab-item active">
            <i class="fas fa-home text-xl"></i>
            <span class="text-xs mt-1">首页</span>
        </a>
        <a href="nft_detail.html" class="tab-item">
            <i class="fas fa-store text-xl"></i>
            <span class="text-xs mt-1">市场</span>
        </a>
        <a href="wallet.html" class="tab-item">
            <i class="fas fa-solar-panel text-xl"></i>
            <span class="text-xs mt-1">我的资产</span>
        </a>
        <a href="exchange.html" class="tab-item">
            <i class="fas fa-exchange-alt text-xl"></i>
            <span class="text-xs mt-1">兑换</span>
        </a>
    </div>
</body>
</html>